<link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../css/themes/icon.css">

<div id="panel-anti-medical" data-options="border:false;width:100%">
  			
    <form class="condition-form">
		<table> 	
			<tr>
				<th>统计时间</th>
				<td><input name="monitor_year_month" id="monitor_year_month" type="text"  class="easyui-datebox easyui-validatebox"  style="width:150px" 
					data-options="formatter: function(date){
						var y = date.getFullYear();
						var m = date.getMonth()+1;						
						return y+'-'+m;
					},
					parser:function(s){
						var t = Date.parse(s);
						if (!isNaN(t)){
							return new Date(t);
						} else {
							return new Date();
						}
					},
					value:new Date()
					
				"/></td>
				
				<th>科室名称</th>
				<td><input name="dept_name_like" id="dept_name_like" type="text"  class="easyui-textbox easyui-validatebox" style="width:150px"/></td>
				<th>统计类型</th>
				<td>
					<select name="patient_type" id="patient_type" type="text"  class="easyui-combobox easyui-validatebox" style="width:150px">
						<option value='1'>门诊</option>
						<option value='2'>住院</option>						
					</select>
				</td>
				<th>统计维度</th>
				<td>
					<select name="data_type" id="data_type" type="text"  class="easyui-combobox easyui-validatebox" style="width:150px">
						<option value='1'>全院</option>
						<option value='2'>科室</option>
						<option value='3'>医生</option>
					</select>
				</td>
				<th></th>
				<td><a href="javascript:void(0);" class="easyui-linkbutton conditon-search function-btn" iconCls="icon-search">执行查询</a></td>
			</tr>				
		</table>
	</form>
	
    
	<table class="easyui-datagrid dg-list"  
		data-options="rownumbers:true,
		animate: true,							
		striped:true,
		border:true,
		//singleSelect:false,
		idField: 'id',					
		fitColumns: true,
		checkOnSelect:true,
		selectOnCheck:true,
		width : 'auto',
		pagination : true">
		
		<thead>						
			<tr>				
				<th field="dept_name" width="80" halign="center" align="left">科室名称</th>
				<th field="doct_name" width="60" align="center">医生姓名</th>
				<th field="count_num" width="60" align="center">处方总数</th>
				<th field="anti_num" width="60" align="center">抗菌药物处方总数</th>
				<th field="anti_percent" width="60" align="center" data-options="
					styler: function(value,row,index){
						var standard
						if(row &&　row.amount_percent_standard){
							standard = row.amount_percent_standard
						}else{
							standard = 60
						}
						if (value){
							if(value > standard){
								return 'color:red;';							
							}else{
								return 'color:green;';
							}
						}else{
							return 'color:green;';
						}
					},formatter: function(value,row,index){
						if (value && value > 0){
							return   value.toFixed(2) +'%';							
						}else{
							return '0.0%';
						}
					}
					
				">抗菌药物处方比例</th>
				<th field="amount_percent_standard" width="60" align="center" data-options="
					formatter: function(value,row,index){
						if (value && value > 0){
							return   value.toFixed(1) +'%';							
						}else{
							return '60.0%';
						}
					}
				">抗菌药物处方指标</th>																		
			</tr>		
                          
		</thead>
		
	</table>
	  
    

 
<script>
requirejs(['listPageModule','domReady!'],function(dept,doc){
	dept.init({doc:doc,
				rootId:'panel-anti-medical',				
				subSystemCode:'medical',
				moduleCode:'antiMedical',
				querylistUrl:'getDeptListDomain'});
});	

</script>

